import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
//从键盘上输入一个字符串,用scanner类实现
        Scanner sc =new Scanner(System.in );
        System.out.println("请输入:");
        String s =sc.nextLine();
//        统计三种字符的个数
        int bigCount =0;
        int smallCount =0;
        int numCount =0;
//        遍历字符串,得到每一个字符.
        char[] chars=s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            char c =chars[i];
//            判断属于哪种类型,然后对应类型的统计变量+1
            if(c>='A'&&c<='Z'){
                bigCount++;
            }else if(c>='a'&&c<='z'){
                smallCount++;
            }else if(c>='0'&&c<='9'){
                numCount++;
            }
        }
        System.out.println(bigCount);
        System.out.println(smallCount);
        System.out.println(numCount);
    }
}
